From 9424a596b0d4b4c9e80d98697eb9606fda87bfec Mon Sep 17 00:00:00 2001 From: robertl Date: Mon, 13 Nov 2006 21:07:28 +0000 Subject: [PATCH] Move version into a generated (yet committed) file so it can be shared between the configure-ful and configure-free builds. --- Makefile.in | 7 ++----- configure | 5 +++-- configure.in | 6 +++--- gbversion.h | 2 ++ gbversion.h.in | 2 ++ globals.c | 1 + msvc/config.h | 4 ---- 7 files changed, 13 insertions(+), 14 deletions(-) create mode 100644 gbversion.h create mode 100644 gbversion.h.in diff --git a/Makefile.in b/Makefile.in index 8cbe6d630..bb0213d1c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -10,7 +10,7 @@ VERSIOND=$(VERSD)$(RELEASE) VERSIONU=$(VERSU)$(RELEASE) DOCVERSION=development -DOCVERSION=@PACKAGE_VERSION@ +# DOCVERSION=@PACKAGE_VERSION@ CC=@CC@ EXEEXT=@EXEEXT@ @@ -107,9 +107,6 @@ gpsbabel-debug: $(OBJS) Makefile: Makefile.in config.status CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status -globals.o: - $(CC) @CPPFLAGS@ -c $(GBCFLAGS) -DVERSION=\"$(VERSIOND)\" $< $(OUTPUT_SWITCH)$@ - jeeps/gpslibusb.o: $(CC) @CPPFLAGS@ -c $(GBCFLAGS) @USB_CFLAGS@ @srcdir@/jeeps/gpslibusb.c $(OUTPUT_SWITCH)$@ @@ -397,7 +394,7 @@ geoniche.o: geoniche.c defs.h config.h queue.h gbtypes.h zlib/zlib.h \ jeeps/gpsread.h jeeps/gpsutil.h jeeps/gpsapp.h jeeps/gpsprot.h \ jeeps/gpscom.h jeeps/gpsfmt.h jeeps/gpsmath.h jeeps/gpsmem.h \ jeeps/gpsrqst.h jeeps/gpsinput.h jeeps/gpsproj.h garmin_tables.h -globals.o: globals.c defs.h config.h queue.h gbtypes.h zlib/zlib.h \ +globals.o: globals.c defs.h gbversion.h config.h queue.h gbtypes.h zlib/zlib.h \ zlib/zconf.h gbfile.h cet.h cet_util.h inifile.h glogbook.o: glogbook.c defs.h config.h queue.h gbtypes.h zlib/zlib.h \ zlib/zconf.h gbfile.h cet.h cet_util.h inifile.h xmlgeneric.h diff --git a/configure b/configure index 9b7086aaa..0fe296908 100755 --- a/configure +++ b/configure @@ -1281,7 +1281,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # YYYYMMDD, please, if beta, i.e. "-beta20060413" -PACKAGE_RELEASE="" +PACKAGE_RELEASE="-beta20061113" cat >>confdefs.h <<_ACEOF #define PACKAGE_RELEASE "$PACKAGE_RELEASE" @@ -3448,7 +3448,7 @@ fi done - ac_config_files="$ac_config_files Makefile xmldoc/makedoc tools/mkcapabilities win32/gpsbabel.rc coldsync/Makefile jeeps/Makefile shapelib/Makefile zlib/empty" + ac_config_files="$ac_config_files Makefile gbversion.h xmldoc/makedoc tools/mkcapabilities win32/gpsbabel.rc coldsync/Makefile jeeps/Makefile shapelib/Makefile zlib/empty" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -3976,6 +3976,7 @@ do case "$ac_config_target" in # Handling of arguments. "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "gbversion.h" ) CONFIG_FILES="$CONFIG_FILES gbversion.h" ;; "xmldoc/makedoc" ) CONFIG_FILES="$CONFIG_FILES xmldoc/makedoc" ;; "tools/mkcapabilities" ) CONFIG_FILES="$CONFIG_FILES tools/mkcapabilities" ;; "win32/gpsbabel.rc" ) CONFIG_FILES="$CONFIG_FILES win32/gpsbabel.rc" ;; diff --git a/configure.in b/configure.in index 21d196957..7bba3b118 100644 --- a/configure.in +++ b/configure.in @@ -3,10 +3,10 @@ AC_PREREQ(2.59) -AC_INIT(GPSBabel, 1.3.2-1109, BUG-REPORT-ADDRESS) +AC_INIT(GPSBabel, 1.3.2, BUG-REPORT-ADDRESS) # YYYYMMDD, please, if beta, i.e. "-beta20060413" -PACKAGE_RELEASE="" +PACKAGE_RELEASE="-beta20061113" AC_DEFINE_UNQUOTED(PACKAGE_RELEASE, "$PACKAGE_RELEASE", [Define to the release name of this package.]) AC_SUBST(PACKAGE_RELEASE) @@ -274,5 +274,5 @@ AC_SUBST(DOCDIR) # AC_CHECK_FUNCS([atexit floor localtime_r memmove memset pow select sqrt strchr strcspn strdup strerror strncasecmp strrchr strspn strstr strtol strtoul]) AC_CHECK_FUNCS([nanosleep sleep]) -AC_CONFIG_FILES([Makefile xmldoc/makedoc tools/mkcapabilities win32/gpsbabel.rc coldsync/Makefile jeeps/Makefile shapelib/Makefile zlib/empty]) +AC_CONFIG_FILES([Makefile gbversion.h xmldoc/makedoc tools/mkcapabilities win32/gpsbabel.rc coldsync/Makefile jeeps/Makefile shapelib/Makefile zlib/empty]) AC_OUTPUT diff --git a/gbversion.h b/gbversion.h new file mode 100644 index 000000000..a6237f25b --- /dev/null +++ b/gbversion.h @@ -0,0 +1,2 @@ +#define VERSION "1.3.2-beta20061113" + diff --git a/gbversion.h.in b/gbversion.h.in new file mode 100644 index 000000000..cb98510ac --- /dev/null +++ b/gbversion.h.in @@ -0,0 +1,2 @@ +#define VERSION "@GBMAJOR@.@GBMINOR@.@GBMICRO@@PACKAGE_RELEASE@" + diff --git a/globals.c b/globals.c index 72e343d3a..f51201caa 100644 --- a/globals.c +++ b/globals.c @@ -21,6 +21,7 @@ #include "defs.h" +#include "gbversion.h" global_options global_opts; const char gpsbabel_version[] = VERSION; diff --git a/msvc/config.h b/msvc/config.h index c76826c3d..39219e102 100644 --- a/msvc/config.h +++ b/msvc/config.h @@ -22,7 +22,3 @@ #define ZLIB_INHIBITED 1 -/* We really should figure out some way to get this from autoconf into - * a file so that the MSVC build can pick it up - */ -#define VERSION "1.3.2-1109" -- 2.30.2